package com.westa.smallshop.data;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Dune on 16/8/8.
 */
public abstract class Base implements Parcelable {

    private Long id;
    private User creater;
    private Long created_time;
    private Long update_time;
    private String uuid;


    public Base() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public User getCreater() {
        return creater;
    }

    public void setCreater(User creater) {
        this.creater = creater;
    }

    public Long getCreated_time() {
        return created_time;
    }

    public void setCreated_time(Long created_time) {
        this.created_time = created_time;
    }

    public Long getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(Long update_time) {
        this.update_time = update_time;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeParcelable(this.creater, flags);
        dest.writeValue(this.created_time);
        dest.writeValue(this.update_time);
        dest.writeString(this.uuid);
    }

    protected Base(Parcel in) {
        this.id = (Long) in.readValue(Long.class.getClassLoader());
        this.creater = in.readParcelable(User.class.getClassLoader());
        this.created_time = (Long) in.readValue(Long.class.getClassLoader());
        this.update_time = (Long) in.readValue(Long.class.getClassLoader());
        this.uuid = in.readString();
    }
}
